﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace StudentSystem
{
    class Student
    {
        private  string name;
        private int Id;
        private int sex;
        
        private float score;

        public Student(string name,int id, int sex,float score)
        {
            this.name = name;
            this.Id = id;
            this.sex = sex;
            Score = score;
        }

        public override string ToString()
        {
            return "-----------------------------\n"+
                "学生编号：" + Id + "\n学生姓名：" + name + "\n学生性别：" + PSex(this.sex) + "\n学生成绩："+score;
        }

        public Student()
        {
            
        }

        public string PSex(int a)
        {
            if (a == 1)
            {
                return "boy";
            }
                return "girl";
        }

        public int ID
        {
            get { return Id; }
            set { Id = value; }

        }

        public int SEX
        {
            get { return sex; }
            set { sex = value; }
        }
        public string Name
        {
            get { return name; }
            set { name = value; } 
        }

                public float Score
        {
            get { return score; }
            set { score = value; }
        }

        public static void queryInformation()//查询名字
        {
            Drawing.studintInterface();
            string enterName;
            string YN;
            bool exit = false;
            do
            {
                Console.WriteLine("输入查询学生名称");
            enterName = Console.ReadLine();
            Console.WriteLine(enterName);
            Console.WriteLine("是否退出程序:  (Y//N)");
                YN = Console.ReadLine();

                if (YN=="y"||YN=="Y")
                {
                    Environment.Exit(0);
                }
                if (YN == "n" || YN == "N")
                {
                    exit = true;
                }
                
            } while (exit);
            
            
            
        }
    }

    public class DateBase
    {
        static List<Student> Mylist=new List<Student>();
 

    }
}
